/*************************************************************************
	> File Name: SefonIotGetRequestId.c
	> Author: ypj
	> Mail: ypj@163.com 
	> Created Time: Wed 09 Aug 2017 05:26:39 PM CST
 ************************************************************************/
#include"SefonIotGetRequestId.h"
//#include<time.h>
#include "SefonIotPlatformOs.h"
void SefonIotGetRequestId(char * idbuf, unsigned char idlen)
{
    uint8_t i = 0;
    static char chr[3] = {'0','a','A'};
    srand((unsigned)SefonIotPlatformTimeGetMs());
    for (; i < idlen; i++)
    {
        int r = rand();
        if (0 ==(r % 3))
            idbuf[i] = chr[r % 3] + rand() % 10;
        else
            idbuf[i] = chr[r % 3] + rand() % 26;
    }
    return;
}

